import request from '@/config/axios';

// 查询（精简)列表
export const getSimpleDeptList = async () => {
  return await request.get({ url: '/system/dept/simple-list' });
};

// 查询列表
export const getDeptPage = async (params: any) => {
  return await request.get({ url: '/system/dept/list', params });
};

// 查询详情
export const getDept = async (id: number) => {
  return await request.get({ url: '/system/dept/get?id=' + id });
};

// 新增
export const createDept = async (data: any) => {
  return await request.post({ url: '/system/dept/create', data: data });
};

// 修改
export const updateDept = async (params: any) => {
  return await request.put({ url: '/system/dept/update', data: params });
};

// 删除
export const deleteDept = async (id: any) => {
  return await request.delete({ url: '/system/dept/delete?id=' + id });
};
